﻿<UserControl x:Class="de.wolfmarco.pas.Client.MVVM.DatabaseSettingsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="203" d:DesignWidth="345.704">
    <Grid>
        <Grid.Resources>
            <Style TargetType="{x:Type Label}">
                <Setter Property="Margin" Value="0"/>
                <Setter Property="Padding" Value="0"/>
            </Style>            
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="23" />
            <RowDefinition Height="23" />
            <RowDefinition Height="23" />
            <RowDefinition Height="23" />
            <RowDefinition Height="23" />
            <RowDefinition Height="23" />
            <RowDefinition Height="23" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="110" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Label Grid.Row="0" Grid.Column="0" x:Name="lblDatabaseType" Content="Datenbank-Typ:" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <ComboBox Grid.Row="0" Grid.Column="1" x:Name="databaseType" HorizontalAlignment="Left" VerticalAlignment="Center"  Height="23" Width="200"
                  SelectedValue="{Binding DatabaseType, UpdateSourceTrigger=PropertyChanged}" />

        <Label Grid.Row="1" Grid.Column="0" x:Name="lblServerAddress" Content="IP-Adresse:" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <TextBox Grid.Row="1" Grid.Column="1" x:Name="serverAddress" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" VerticalAlignment="Center" Width="200"
                 Text="{Binding Server, UpdateSourceTrigger=PropertyChanged}" />

        <Label Grid.Row="2" Grid.Column="0" x:Name="lblPort" Content="Port:" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <TextBox Grid.Row="2" Grid.Column="1" x:Name="port" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" VerticalAlignment="Center" Width="200"
                 Text="{Binding Port, UpdateSourceTrigger=PropertyChanged}" />

        <Label Grid.Row="3" Grid.Column="0" x:Name="lblDatabaseName" Content="Datenbank-Name:" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <TextBox Grid.Row="3" Grid.Column="1" x:Name="databaseName" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" VerticalAlignment="Center" Width="200"
                 Text="{Binding DatabaseName, UpdateSourceTrigger=PropertyChanged}" />

        <Label Grid.Row="4" Grid.Column="0" x:Name="lblUserName" Content="Benutzer-Name:" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <TextBox Grid.Row="4" Grid.Column="1" x:Name="userName" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" VerticalAlignment="Center" Width="200"
                 Text="{Binding UserName, UpdateSourceTrigger=PropertyChanged}" />

        <Label Grid.Row="5" Grid.Column="0" x:Name="lblPassword" Content="Passwort:" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <TextBox Grid.Row="5" Grid.Column="1" x:Name="password" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" VerticalAlignment="Center" Width="200"
                 Text="{Binding Password, UpdateSourceTrigger=PropertyChanged}" />
        <!--<PasswordBox Grid.Row="5" Grid.Column="1" x:Name="password" HorizontalAlignment="Left" VerticalAlignment="Center" Height="23" Width="200"
                     Password="{Binding DatabaseConfig.Password}" />-->

        <Button Name="buttonSave" Grid.Row="6" Grid.Column="1" Content="Speichern" HorizontalAlignment="Left" VerticalAlignment="Center" Height="20" Width="75"
                Command="{Binding SaveCommand}"/>
    </Grid>
</UserControl>
